# 事件定义
# 转向
C_TUREND = 0x01
S_TUREND = 0x01
# 移动
C_MOVE = 0x02
S_MOVE = 0x02
# 移动2
C_RUN = 0x03
S_RUN = 0x03
# 攻击
C_ATK = 0x04
S_ATK = 0X04
# 拾取
C_PICKITEM = 0X05
S_PICKITEM = 0X05
# 使用物品
C_USEITEM = 0X06
S_USEITEM = 0X06
# 游戏时间
S_GAMETIME = 0x91
# 出现僵尸
S_GAME_BULZB = 0x71
# 事件
S_GAME_EVENT = 0x81



"""消息结构定义"""
cmd_msg = {
		#游戏模式信
		"game_s_game_mode" : {
			"mode" : "B",
			"stage" : "I",
			"master" : "B",
			"max_num" : "I",
			},

		#游戏初始化完成
		"game_c_game_init":{
			"binit" : "B",
			},
		#游戏开始初始化
		"game_s_game_init":{
			"stage":"I",
			},
		#玩家进入
		"game_s_user_in_game":{
			"side" : "B",
			"urs" : "s",
			"uid" : "I",
			"nickname" : "s",
			"is_ready" : "B",
			"gmlvl" : "I",
			"hid" : "I",
			},
		#玩家退出
		"game_s_user_out_game" : {
			"side" : "B",
			},
		#选择关卡（客户端）
		"game_c_select_stage" : {
			"stage" : "I",
			},
		#选择关卡（服务端）
		"game_s_select_stage" : {
			"stage" : "I",
			},
		#准备/取消准备
		"game_c_game_ready" : {
			"is_ready" : "B",
			},
		#准备/取消准备
		"game_s_game_ready" : {
			"side" : "B",
			"is_ready" : "B",
			},
		#倒数/取消倒数
		"game_s_countdown" : {
			"is_countdown" : "B",
			},
		#只含有一个int数的包，用于实现打包中出现不定长的int组成的list
		"game_single_int" : {
			"value" : "i",
			},
		#游戏开始的时候群发的游戏玩家初始化信息
		"game_player_start_info" : {
			"side" : "B",
			"ifac" : "i",
			"money" : "i",
			"dicsprite" : "i",
			}, \
		#游戏开始
		"game_s_game_start" : {
			"stage" : "I",
			"player_list" : "game_player_start_info",
			},
		#游戏具体事件（客户端）
		"game_c_game_event" : {
			"frame" : "I",
			"event_id" : "H",
			"param" : "s",
			}, \
		#游戏具体事件（服务端）
		"game_s_game_event" : {
			"frame" : "I",
			"event_id" : "H",
			"param" : "s",
			}, \
		#单个玩家的游戏结果
		"game_player_end_info" : {
			"side" : "B",
			"rank" : "B",
			"score" : "i",
			"killed" : "i",
			},
		#游戏结束和本局游戏结果
		"game_s_game_end" : {
			"win" : "B",
			"stage" : "I",
			"player_list" : "game_player_end_info",
			}, \
		#离开房间
		"game_c_leave_game" : {
			"no_use" : "B",
			},
		#结束游戏
		"game_c_game_end" : {
			"iswin" : "B",
			},

		#玩家具体信息
		"game_s_player_detail_info" : {
			"side" : "B",
			"score" : "i",
			"_win" : "I",
			"_lose" : "I",
			"_draw" : "I",
			"_break" : "I",
			"avatar" : "s",
			"pet" : "s",
			},
		#玩家隐私信息，由于只会收到自己的，所以没有side信息
		"game_s_player_secret_info" : {
			"yuanbao" : "i",
			"yuanbao_free" : "i",
			"finish_stage" : "game_single_int",
			"finish_achieve" : "game_single_int",
			},
		#玩家完成的成就id
		"game_s_player_finish_achieve" : {
			"achieve_id" : "I",
			},
		#游戏准备
		"game_s_game_init" :{
			"stage" : "I",
			#"_type" : S_GAME_INIT,
			}, \
		#房主踢人
		"game_c_game_kick" :{
			"hid" : "I",
			},
		#房间新座位客户端发送
		"game_c_game_side" :{
			"uid":"I",
			"old_side" : "B",
			"new_side" : "B",
			},
		#房间新座位服务器发送
		"game_s_game_side" :{
			"uid":"I",
			"old_side" : "B",
			"new_side" : "B",
			},
		#更新房主
		"game_c_game_master":{
			"master" : "B",
			},
		#更新房主
		"game_s_game_master":{
			"master" : "B",
			},

}

